home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April / PCWorld_2008-04_cd.bin / v cisle / ozo / zotero-1.0.3.xpi / chrome / zotero.jar / content / zotero / overlay.xul < prev    next >
Encoding:
Extensible Markup Language  |  2007-10-19  |  21.8 KB  |  429 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.     ***** BEGIN LICENSE BLOCK *****
  4.     
  5.     Copyright (c) 2006  Center for History and New Media
  6.                         George Mason University, Fairfax, Virginia, USA
  7.                         http://chnm.gmu.edu
  8.     
  9.     Licensed under the Educational Community License, Version 1.0 (the "License");
  10.     you may not use this file except in compliance with the License.
  11.     You may obtain a copy of the License at
  12.     
  13.     http://www.opensource.org/licenses/ecl1.php
  14.     
  15.     Unless required by applicable law or agreed to in writing, software
  16.     distributed under the License is distributed on an "AS IS" BASIS,
  17.     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18.     See the License for the specific language governing permissions and
  19.     limitations under the License.
  20.     
  21.     ***** END LICENSE BLOCK *****
  22. -->
  23. <?xml-stylesheet href="chrome://zotero/skin/overlay.css" type="text/css"?>
  24.  
  25. <!DOCTYPE overlay [
  26.     <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">    %globalDTD;
  27.     <!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd">    %zoteroDTD;
  28. ]>
  29.  
  30. <overlay id="zotero"
  31.     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  32.     <?xul-overlay href="itemPane.xul" ?>
  33.     
  34.     <!-- Include the global XPCOM object -->
  35.     <script src="include.js"/>
  36.     
  37.     <script src="overlay.js"/>
  38.     <script src="fileInterface.js"/>
  39.     <script src="reportInterface.js"/>
  40.     <script src="timelineInterface.js"/>
  41.     <script src="browser.js"/>
  42.     <script src="chrome://global/content/nsDragAndDrop.js"/>
  43.     <script src="chrome://global/content/nsTransferable.js"/>
  44.     
  45.     <commandset id="mainCommandSet">
  46.         <command id="cmd_zotero_search" oncommand="ZoteroPane.search();"/>
  47.         <command id="cmd_zotero_reportErrors" oncommand="ZoteroPane.reportErrors();"/>
  48.     </commandset>
  49.     
  50.     <toolbarpalette id="BrowserToolbarPalette">
  51.         <toolbarbutton id="scholar-toolbar-button"/> <!-- May be necessary to keep pre-1.0b2 installs from breaking -->
  52.         <toolbarbutton id="zotero-toolbar-button" class="toolbarbutton-1"
  53.                         label="Zotero"
  54.                         oncommand="ZoteroPane.toggleDisplay();"/>
  55.     </toolbarpalette>
  56.     
  57.     <popup id="contentAreaContextMenu">
  58.         <menuseparator id="zotero-context-separator" hidden="true"/>
  59.         <menuitem id="zotero-context-add-to-current-note" class="menu-iconic"
  60.             label="&zotero.contextMenu.addTextToCurrentNote;" hidden="true"
  61.             oncommand="ZoteroPane.addTextToNote(window.content.getSelection().toString())"/>
  62.         <menuitem id="zotero-context-add-to-new-note" class="menu-iconic"
  63.             label="&zotero.contextMenu.addTextToNewNote;" hidden="true"
  64.             oncommand="var itemID = ZoteroPane.addItemFromPage(); ZoteroPane.newNote(false, itemID, window.content.getSelection().toString())"/>
  65.         <menuitem id="zotero-context-save-link-as-snapshot" class="menu-iconic"
  66.             label="&zotero.contextMenu.saveLinkAsSnapshot;" hidden="true"
  67.             oncommand="Zotero.Attachments.importFromURL(window.gContextMenu.linkURL, false, false, false, ZoteroPane.getSelectedCollection(true))"/>
  68.         <menuitem id="zotero-context-save-image-as-snapshot" class="menu-iconic"
  69.             label="&zotero.contextMenu.saveImageAsSnapshot;" hidden="true"
  70.             oncommand="Zotero.Attachments.importFromURL(window.gContextMenu.onImage ? window.gContextMenu.imageURL : window.gContextMenu.bgImageURL, false, false, false, ZoteroPane.getSelectedCollection(true))"/>
  71.     </popup>
  72.     
  73.     <vbox id="appcontent">
  74.         <!-- Changes to attributes of zotero-splitter and zotero-pane must be mirrored on overlay.js's onLoad() function -->
  75.         <!-- onmouseup shouldn't be necessary but seems to help prevent tag selector from sometimes going off the screen -->
  76.         <splitter id="zotero-splitter" resizebefore="closest" resizeafter="closest" hidden="true"
  77.             onmouseup="ZoteroPane.updateTagSelectorSize()"/>
  78.         <hbox id="zotero-pane" persist="savedHeight" hidden="true"
  79.             onkeydown="ZoteroPane.handleKeyDown(event, this.id)"
  80.             onkeyup="ZoteroPane.handleKeyUp(event, this.id)"
  81.             chromedir="&locale.dir;">
  82.             <popupset>
  83.                 <popup id="zotero-collectionmenu" onpopupshowing="ZoteroPane.buildCollectionContextMenu();">
  84.                     <menuitem label="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane.newCollection()"/>
  85.                     <menuitem label="&zotero.toolbar.newSavedSearch.label;" oncommand="ZoteroPane.newSearch()"/>
  86.                     <menuitem label="&zotero.toolbar.newSubcollection.label;" oncommand="ZoteroPane.newCollection(ZoteroPane.getSelectedCollection().getID())"/>
  87.                     <menuseparator/>
  88.                     <menuitem oncommand="ZoteroPane.editSelectedCollection();"/>
  89.                     <menuitem oncommand="ZoteroPane.deleteSelectedCollection();"/>
  90.                     <menuseparator/>
  91.                     <menuitem oncommand="Zotero_File_Interface.exportCollection();"/>
  92.                     <menuitem oncommand="Zotero_File_Interface.bibliographyFromCollection();"/>
  93.                     <menuitem label="&zotero.toolbar.export.label;" oncommand="Zotero_File_Interface.exportFile()"/>
  94.                     <menuitem oncommand="Zotero_Report_Interface.loadCollectionReport()"/>
  95.                 </popup>
  96.                 <popup id="zotero-itemmenu" onpopupshowing="ZoteroPane.buildItemContextMenu();">
  97.                     <menuitem label="&zotero.items.menu.showInLibrary;" oncommand="ZoteroPane.selectItem(this.parentNode.getAttribute('itemID'), true)"/>
  98.                     <menuseparator/>
  99.                     <menuitem label="&zotero.items.menu.attach.note;" oncommand="ZoteroPane.newNote(false, this.parentNode.getAttribute('itemID'))"/>
  100.                     <menuitem label="&zotero.items.menu.attach.snapshot;" oncommand="ZoteroPane.addAttachmentFromPage(false, this.parentNode.getAttribute('itemID'));"/>
  101.                     <menuitem label="&zotero.items.menu.attach.link;" oncommand="ZoteroPane.addAttachmentFromPage(true, this.parentNode.getAttribute('itemID'));"/>
  102.                     <menuseparator/>
  103.                     <menuitem label="&zotero.items.menu.duplicateItem;" oncommand="ZoteroPane.duplicateSelectedItem();"/>
  104.                     <menuitem oncommand="ZoteroPane.deleteSelectedItem();"/>
  105.                     <menuitem oncommand="ZoteroPane.deleteSelectedItem(true);"/>
  106.                     <menuseparator/>
  107.                     <menuitem oncommand="Zotero_File_Interface.exportItems();"/>
  108.                     <menuitem oncommand="Zotero_File_Interface.bibliographyFromItems();"/>
  109.                     <menuitem oncommand="Zotero_Report_Interface.loadItemReport()"/>
  110.                     <menuseparator/>
  111.                     <menuitem oncommand="ZoteroPane.reindexItem();"/>
  112.                 </popup>
  113.             </popupset>
  114.             
  115.             <vbox id="zotero-collections-pane" persist="width" flex="1">
  116.                 <!-- This extra vbox prevents the toolbar from getting compressed when resizing
  117.                         the tag selector to max height -->
  118.                 <vbox flex="1">
  119.                     <toolbar>
  120.                         <toolbarbutton id="zotero-tb-collection-add" tooltiptext="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane.newCollection()"/>
  121.                         <spacer flex="1"/>
  122.                         <toolbarbutton id="zotero-tb-tag-selector" tooltiptext="&zotero.toolbar.tagSelector.label;" oncommand="ZoteroPane.toggleTagSelector()"/>
  123.                         <toolbarbutton id="zotero-tb-actions-menu" tooltiptext="&zotero.toolbar.actions.label;" type="menu">
  124.                             <menupopup id="zotero-tb-actions-popup" onpopupshowing="document.getElementById('cmd_zotero_reportErrors').setAttribute('disabled', Zotero.getErrors().length == 0)">
  125.                                 <menuitem id="zotero-tb-actions-import" label="&zotero.toolbar.import.label;" oncommand="Zotero_File_Interface.importFile();"/>
  126.                                 <menuitem id="zotero-tb-actions-export" label="&zotero.toolbar.export.label;" oncommand="Zotero_File_Interface.exportFile();"/>
  127.                                 <menuseparator id="zotero-tb-actions-utilities-separator"/>
  128.                                 <menuitem id="zotero-tb-actions-timeline" label="&zotero.toolbar.timeline.label;" oncommand="Zotero_Timeline_Interface.loadTimeline()"/>
  129.                                 <menuseparator id="zotero-tb-actions-separator"/>
  130.                                 <menuitem id="zotero-tb-actions-prefs" label="&zotero.toolbar.preferences.label;"
  131.                                     oncommand="window.openDialog('chrome://zotero/content/preferences/preferences.xul', 'zotero-prefs', 'chrome,titlebar,toolbar,' + Zotero.Prefs.get('browser.preferences.instantApply', true) ? 'dialog=no' : 'modal')"/>
  132.                                 <menuitem id="zotero-tb-actions-reportErrors" command="cmd_zotero_reportErrors" disabled="true"/>
  133.                                 <menuitem id="zotero-tb-actions-documentation" label="&zotero.toolbar.documentation.label;" oncommand="window.open('http://www.zotero.org/documentation/', '', 'menubar=yes,location=yes,toolbar=yes,personalbar=yes,resizable=yes,scrollbars=yes,status=yes');"/>
  134.                                 <menuitem id="zotero-tb-actions-about" label="&zotero.toolbar.about.label;" oncommand="window.openDialog('chrome://zotero/content/about.xul', 'about', 'chrome')"/>
  135.                             </menupopup>
  136.                         </toolbarbutton>
  137.                     </toolbar>
  138.                     <tree id="zotero-collections-tree" hidecolumnpicker="true" context="zotero-collectionmenu"
  139.                         onmouseover="ZoteroPane.collectionsView.setHighlightedRows();"
  140.                         ondblclick="ZoteroPane.onDoubleClick(event, this);"
  141.                         onselect="ZoteroPane.onCollectionSelected();" seltype="single"
  142.                         ondragdrop="nsDragAndDrop.drop(event, ZoteroPane.collectionsView)"
  143.                         ondraggesture="if (event.target.localName == 'treechildren') nsDragAndDrop.startDrag(event, ZoteroPane.collectionsView);"
  144.                         onkeypress="ZoteroPane.handleKeyPress(event, this.id)"
  145.                         flex="1">
  146.                         <treecols>
  147.                             <treecol
  148.                                 id="zotero-collections-name-column"
  149.                                 label="&zotero.collections.name_column;"
  150.                                 flex="1"
  151.                                 primary="true"/>
  152.                         </treecols>
  153.                         <treechildren/>
  154.                     </tree>
  155.                 </vbox>
  156.                 <splitter id="zotero-tags-splitter" persist="collapsed" onmouseup="ZoteroPane.updateTagSelectorSize()"/>
  157.                 <zoterotagselector id="zotero-tag-selector" persist="height,collapsed,showAutomatic"
  158.                     oncommand="ZoteroPane.updateTagFilter()"/>
  159.             </vbox>
  160.             
  161.             <splitter id="zotero-tree-splitter" resizebefore="closest" resizeafter="closest"/>
  162.             
  163.             <vbox id="zotero-items-pane" persist="width" flex="1">
  164.                 <toolbar align="center">
  165.                     <toolbarbutton id="zotero-tb-add" tooltiptext="&zotero.toolbar.newItem.label;" type="menu">
  166.                         <!-- New Item drop-down built in overlay.js::onLoad() -->
  167.                         <menupopup>
  168.                             <menuseparator/>
  169.                             <menuitem label="&zotero.toolbar.attachment.linked;" oncommand="ZoteroPane.addAttachmentFromDialog(true);"/>
  170.                             <menuitem label="&zotero.toolbar.attachment.add;" oncommand="ZoteroPane.addAttachmentFromDialog();"/>
  171.                             <menuseparator/>
  172.                             <menu label="&zotero.toolbar.moreItemTypes.label;">
  173.                                 <menupopup id="zotero-tb-add-more"/>
  174.                             </menu>
  175.                         </menupopup>
  176.                     </toolbarbutton>
  177.                     <toolbarbutton id="zotero-tb-item-from-page" tooltiptext="&zotero.toolbar.newItemFromPage.label;" oncommand="ZoteroPane.addItemFromPage()"/>
  178.                     <toolbarseparator/>
  179.                     <toolbarbutton id="zotero-tb-link-page" tooltiptext="&zotero.toolbar.attachment.weblink;" oncommand="ZoteroPane.addAttachmentFromPage(true)"/>
  180.                     <toolbarbutton id="zotero-tb-snapshot-page" tooltiptext="&zotero.toolbar.attachment.snapshot;" oncommand="ZoteroPane.addAttachmentFromPage()"/>
  181.                     <toolbarbutton id="zotero-tb-note-add" tooltiptext="&zotero.toolbar.note.standalone;" oncommand="ZoteroPane.newNote(event.shiftKey);"/>
  182.                     <toolbarseparator/>
  183.                     <toolbarbutton id="zotero-tb-advanced-search" tooltiptext="&zotero.toolbar.advancedSearch;" oncommand="ZoteroPane.openAdvancedSearchWindow()"/>
  184.                     <spacer flex="1"/>
  185.                     <label value="&zotero.toolbar.search.label;" control="zotero-tb-search"/>
  186.                     <textbox id="zotero-tb-search" type="conditional-timed" timeout="250" command="cmd_zotero_search" dir="reverse"
  187.                         onkeypress="ZoteroPane.handleSearchKeypress(this, event)"
  188.                         oninput="ZoteroPane.handleSearchInput(this, event)"
  189.                         testcode="me.value.indexOf('"') == -1"
  190.                         prefire="ZoteroPane.clearItemsPaneMessage()"
  191.                         ontestfail="ZoteroPane.setItemsPaneMessage(Zotero.getString('advancedSearchMode'))">
  192.                         <toolbarbutton id="zotero-tb-search-cancel" oncommand="this.parentNode.value='';" hidden="true"/>
  193.                     </textbox>
  194.                 </toolbar>
  195.                 
  196.                 <deck id="zotero-items-pane-content" selectedIndex="0" flex="1">
  197.                     <tree 
  198.                         id="zotero-items-tree" context="zotero-itemmenu"
  199.                         ondblclick="ZoteroPane.onDoubleClick(event, this);"
  200.                         enableColumnDrag="true"
  201.                         onfocus="if (ZoteroPane.itemsView.rowCount && !ZoteroPane.itemsView.selection.count) { ZoteroPane.itemsView.selection.select(0); }"
  202.                         onkeypress="ZoteroPane.handleKeyPress(event, this.id)"
  203.                         onselect="ZoteroPane.itemSelected();"
  204.                         ondraggesture="if (event.target.localName == 'treechildren') nsDragAndDrop.startDrag(event,ZoteroPane.itemsView);"
  205.                         ondragover="nsDragAndDrop.dragOver(event, ZoteroPane.itemsView)"
  206.                         ondragdrop="nsDragAndDrop.drop(event, ZoteroPane.itemsView)"
  207.                         flex="1">
  208.                         <treecols>
  209.                             <treecol
  210.                                 id="zotero-items-column-title" primary="true"
  211.                                 label="&zotero.items.title_column;"
  212.                                 flex="4" persist="width ordinal hidden sortActive sortDirection"/>
  213.                             <splitter class="tree-splitter"/>
  214.                             <treecol
  215.                                 id="zotero-items-column-firstCreator"
  216.                                 label="&zotero.items.creator_column;"
  217.                                 flex="1" persist="width ordinal hidden sortActive sortDirection"/>
  218.                             <splitter class="tree-splitter"/>
  219.                             <treecol
  220.                                 id="zotero-items-column-type" hidden="true"
  221.                                 label="&zotero.items.type_column;"
  222.                                 width="40" persist="width ordinal hidden sortActive sortDirection"/>
  223.                             <splitter class="tree-splitter"/>
  224.                             <treecol
  225.                                 id="zotero-items-column-date" hidden="true"
  226.                                 label="&zotero.items.date_column;"
  227.                                 flex="1" persist="width ordinal hidden sortActive sortDirection"/>
  228.                             <splitter class="tree-splitter"/>
  229.                             <treecol
  230.                                 id="zotero-items-column-year" hidden="true"
  231.                                 label="&zotero.items.year_column;"
  232.                                 flex="1" persist="width ordinal hidden sortActive sortDirection"/>
  233.                             <splitter class="tree-splitter"/>
  234.                             <treecol
  235.                                 id="zotero-items-column-publisher" hidden="true"
  236.                                 label="&zotero.items.publisher_column;"
  237.                                 flex="1" persist="width ordinal hidden sortActive sortDirection"/>
  238.                             <splitter class="tree-splitter"/>
  239.                             <treecol
  240.                                 id="zotero-items-column-language" hidden="true"
  241.                                 label="&zotero.items.language_column;"
  242.                                 flex="1" persist="width ordinal hidden sortActive sortDirection"/>
  243.                             <splitter class="tree-splitter"/>
  244.                             <treecol
  245.                                 id="zotero-items-column-callNumber" hidden="true"
  246.                                 label="&zotero.items.callNumber_column;"
  247.                                 flex="1" persist="width ordinal hidden sortActive sortDirection"/>
  248.                             <splitter class="tree-splitter"/>
  249.                             <treecol
  250.                                 id="zotero-items-column-repository" hidden="true"
  251.                                 label="&zotero.items.repository_column;"
  252.                                 flex="1" persist="width ordinal hidden sortActive sortDirection"/>
  253.                             <splitter class="tree-splitter"/>
  254.                             <treecol
  255.                                 id="zotero-items-column-rights" hidden="true"
  256.                                 label="&zotero.items.rights_column;"
  257.                                 flex="1" persist="width ordinal hidden sortActive sortDirection"/>
  258.                             <splitter class="tree-splitter"/>
  259.                             <treecol
  260.                                 id="zotero-items-column-dateAdded" hidden="true"
  261.                                 label="&zotero.items.dateAdded_column;"
  262.                                 flex="1" persist="width ordinal hidden sortActive sortDirection"/>
  263.                             <splitter class="tree-splitter"/>
  264.                             <treecol
  265.                                 id="zotero-items-column-dateModified" hidden="true"
  266.                                 label="&zotero.items.dateModified_column;"
  267.                                 flex="1" persist="width ordinal hidden sortActive sortDirection"/>
  268.                             <splitter class="tree-splitter"/>
  269.                             <treecol
  270.                                 id="zotero-items-column-numChildren"
  271.                                 label="&zotero.items.numChildren_column;"
  272.                                 persist="width ordinal hidden sortActive sortDirection"/>
  273.                         </treecols>
  274.                         <treechildren/>
  275.                     </tree>
  276.                     
  277.                     <!-- Label for displaying messages when items pane is hidden
  278.                          (e.g. "Advanced search mode ΓÇö press Enter to search.")-->
  279.                     <vbox id="zotero-items-pane-message-box" pack="center" align="center"/>
  280.                 </deck>
  281.             </vbox>
  282.             
  283.             <splitter id="zotero-view-splitter" resizebefore="closest" resizeafter="closest"/>
  284.             
  285.             <vbox id="zotero-item-pane" persist="width">
  286.                 <toolbar align="right">
  287.                     <toolbarbutton id="zotero-tb-fullscreen" tooltiptext="&zotero.toolbar.fullscreen.tooltip;" oncommand="ZoteroPane.fullScreen();"/>
  288.                     <toolbarbutton class="tabs-closebutton" oncommand="ZoteroPane.toggleDisplay()"/>
  289.                 </toolbar>
  290.                 <groupbox flex="1">
  291.                     <caption>
  292.                         <tabs id="zotero-view-tabs" onselect="document.getElementById('zotero-view-item').selectedIndex = this.selectedIndex;" hidden="true">
  293.                             <tab label="&zotero.tabs.info.label;"/>
  294.                             <tab label="&zotero.tabs.notes.label;"/>
  295.                             <tab label="&zotero.tabs.attachments.label;"/>
  296.                             <tab label="&zotero.tabs.tags.label;"/>
  297.                             <tab label="&zotero.tabs.related.label;"/>
  298.                         </tabs>
  299.                     </caption>
  300.                     <deck id="zotero-item-pane-content" selectedIndex="0" flex="1" onselect="document.getElementById('zotero-view-tabs').setAttribute('hidden',(this.selectedIndex != 1));">
  301.                         <box pack="center" align="center">
  302.                             <label id="zotero-view-selected-label"/>
  303.                         </box>
  304.                         <deck id="zotero-view-item" flex="1"/>
  305.                         <!-- Note info pane -->
  306.                         <vbox id="zotero-view-note" flex="1">
  307.                             <noteeditor id="zotero-note-editor" flex="1"/>
  308.                             <button id="zotero-view-note-button" label="&zotero.notes.separate;" oncommand="ZoteroPane.openNoteWindow(this.getAttribute('noteID')); if(this.hasAttribute('sourceID')) ZoteroPane.selectItem(this.getAttribute('sourceID'));"/>
  309.                         </vbox>
  310.                         <!-- Attachment info pane -->
  311.                         <vbox id="zotero-view-attachment" flex="1">
  312.                             <label id="zotero-attachment-label"/>
  313.                             <hbox>
  314.                                 <button id="zotero-attachment-view" flex="1" oncommand="ZoteroPane.viewSelectedAttachment(event);"/>
  315.                                 <button id="zotero-attachment-show" label="&zotero.item.attachment.file.show;" flex="1" oncommand="ZoteroPane.showSelectedAttachmentInFilesystem()"/>
  316.                             </hbox>
  317.                             <label id="zotero-attachment-url" class="text-link" crop="end" onclick="ZoteroPane.loadURI(this.value, event)"/>
  318.                             
  319.                             
  320.                             <label id="zotero-attachment-accessed"/>
  321.                             <label id="zotero-attachment-pages"/>
  322.                             
  323.                             <hbox id="zotero-attachment-index-box">
  324.                                 <label id="zotero-attachment-index-status"/>
  325.                                 <toolbarbutton id="zotero-attachment-reindex" oncommand="ZoteroPane.reindexItem()"/>
  326.                             </hbox>
  327.                             
  328.                             <noteeditor id="zotero-attachment-note-editor" notitle="1" flex="1"/>
  329.                         </vbox>
  330.                     </deck>
  331.                 </groupbox>
  332.             </vbox>
  333.         </hbox>
  334.         
  335.         <!-- Annotation Toolbar -->
  336.         <toolbar id="zotero-annotate-tb" crop="end" insertbefore="content" hidden="true">
  337.             <toolbarbutton id="zotero-annotate-tb-add" tooltiptext="&zotero.annotate.toolbar.add.label;" oncommand="Zotero_Browser.toggleMode(this.id);"/>
  338.             <toolbarbutton id="zotero-annotate-tb-collapse" tooltiptext="&zotero.annotate.toolbar.collapse.label;" oncommand="Zotero_Browser.setCollapsed(true);"/>
  339.             <toolbarbutton id="zotero-annotate-tb-expand" tooltiptext="&zotero.annotate.toolbar.expand.label;" oncommand="Zotero_Browser.setCollapsed(false);"/>
  340.             <toolbarseparator/>
  341.             <toolbarbutton id="zotero-annotate-tb-highlight" tooltiptext="&zotero.annotate.toolbar.highlight.label;" oncommand="Zotero_Browser.toggleMode(this.id);"/>
  342.             <toolbarbutton id="zotero-annotate-tb-unhighlight" tooltiptext="&zotero.annotate.toolbar.unhighlight.label;" oncommand="Zotero_Browser.toggleMode(this.id);"/>
  343.         </toolbar>
  344.     </vbox>
  345.     
  346.     <!-- Scrape Code -->
  347.     <hbox id="urlbar-icons">
  348.         <image src="chrome://zotero/skin/treeitem-book.png" id="zotero-status-image" onclick="Zotero_Browser.scrapeThisPage()" position="1" hidden="true"/>
  349.     </hbox>
  350.     
  351.     <statusbar id="status-bar">
  352.         <statusbarpanel id="zotero-status-bar-icon" hidden="true"
  353.             class="statusbarpanel-iconic" onclick="ZoteroPane.toggleDisplay();"/>
  354.     </statusbar>
  355.     
  356.     <script>
  357.     <![CDATA[
  358.     window.addEventListener('load', function(e){
  359.         var icon = document.getElementById('zotero-status-bar-icon');
  360.         if (Zotero && Zotero.initialized){
  361.             switch (Zotero.Prefs.get('statusBarIcon')) {
  362.                 case 2:
  363.                     icon.setAttribute('hidden', false);
  364.                     break;
  365.                 case 1:
  366.                     icon.setAttribute('hidden', false);
  367.                     icon.setAttribute('compact', true);
  368.                     break;
  369.             }
  370.             
  371.             // Set "Report Errors..." label via property rather than DTD entity,
  372.             // since we need to reference it in script elsewhere
  373.             document.getElementById('zotero-tb-actions-reportErrors').setAttribute('label',
  374.                 Zotero.getString('errorReport.reportErrors'));
  375.             
  376.             // Used for loading the changelog after upgrades
  377.             if (Zotero.initialURL) {
  378.                 setTimeout("gBrowser.selectedTab = gBrowser.addTab(Zotero.initialURL); Zotero.initialURL = null;", 1);
  379.             }
  380.         }
  381.         else {
  382.             if (Zotero) {
  383.                 var errMsg = Zotero.startupError;
  384.             }
  385.             
  386.             // Use defaults if necessary
  387.             if (!errMsg) {
  388.                 // Get the stringbundle manually
  389.                 var src = 'chrome://zotero/locale/zotero.properties';
  390.                 var localeService = Components.classes['@mozilla.org/intl/nslocaleservice;1'].
  391.                         getService(Components.interfaces.nsILocaleService);
  392.                 var appLocale = localeService.getApplicationLocale();
  393.                 var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
  394.                     .getService(Components.interfaces.nsIStringBundleService);
  395.                 var stringBundle = stringBundleService.createBundle(src, appLocale);
  396.                 
  397.                 var errMsg = stringBundle.GetStringFromName('startupError');
  398.             }
  399.             
  400.             icon.setAttribute('tooltiptext', errMsg);
  401.             icon.setAttribute('error', 'true');
  402.             icon.setAttribute('hidden', false);
  403.         }
  404.     }, false);
  405.     
  406.     document.getElementById('appcontent').addEventListener('keydown', ZoteroPane.handleKeyDown, true);
  407.     // Make sure open progress windows are fading
  408.     document.getElementById('appcontent').addEventListener('mousemove', Zotero.ProgressWindowSet.updateTimers, false);
  409.     ]]>
  410.     </script>
  411.     
  412.     <menupopup id="menu_ToolsPopup">
  413.         <menuseparator id="zoteroSeparator" insertbefore="devToolsSeparator"/>
  414.         <menuitem id="tools-zotero" insertbefore="devToolsSeparator"
  415.             oncommand="ZoteroPane.toggleDisplay();" label="Zotero"
  416.             key="key_openZotero"/>
  417.     </menupopup>
  418.     
  419.     <keyset id="mainKeyset">
  420.         <!--
  421.             The key can be changed by the pref extensions.zotero.keys.openZotero,
  422.             but if the values are changed here, the pref won't override them.
  423.         -->
  424.         <key id="key_openZotero"
  425.              key="Z" 
  426.              oncommand="ZoteroPane.toggleDisplay();"
  427.              modifiers="accel alt" />
  428.     </keyset>
  429. </overlay>